//该文件专门用于创建整个应用的路由器
import VueRouter from "vue-router";
//引入自定义的组件
import Login from '../components/users/Login.vue';
import Register from '../components/users/Register.vue';
import Home from '../components/Home.vue';
import BlogList from "../components/functional_module/BlogList.vue"
import ReleaseBlog from "../components/functional_module/ReleaseBlog.vue"
import Chat from "../components/functional_module/Chat.vue"
import BlogDetile from "../components/functional_module/BlogDetile.vue"
import PersonalBlogDetails from "../components/functional_module/PersonalBlogDetails.vue"
import EditBlog from "../components/functional_module/EditBlog.vue"
import MessageBoard from "../components/functional_module/MessageBoard.vue"

//创建并暴露一个路由器
export default new VueRouter({
	routes: [
		{ //重定向到主页
			path: '/',
			redirect: '/home'
		},
		{ //跳转到主页
			path: '/home',
			component: Home,
		},
		{ //跳转到登录界面
			path: '/login',
			component: Login
		},
		{ //跳转到注册界面
			path: '/register',
			component: Register
		},
		{
			//跳转到博客页面
			path: '/blogList',
			component: BlogList,
		},
		{
			//跳转到编写博客页面
			path: '/releaseBlog',
			component: ReleaseBlog,
		},
		{
			//跳转到聊天页面
			path: '/chat',
			component: Chat,
		},
		{
			//跳转到博客详情页面
			path: '/blogDetails',
			component: BlogDetile,
		},
		{
			//跳转到个人博客列表页面
			path: '/personalBlogDetails',
			component: PersonalBlogDetails,
		},
		{
			//跳转到博客修改页面
			path: '/editBlog',
			component: EditBlog,
		},
		{
			//跳转到留言板页面
			path: '/messageBoard',
			component: MessageBoard,
		},
		
	]




});
